<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('清算流水列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            
                            <li>
                                <p>机构订单号：</p>
                                <input type="text" name="bizNo"/>
                            </li>
                           
                            <li>
                                <p>清算日期：</p>
                                <input type="text" name="bankDate"/>
                            </li>
                            
                            <li>
                                <p>对账日期：</p>
                                <input type="text" name="compareDate"/>
                            </li>
                            <li>
                                <p>对账状态：</p>
                                <select name="compareFlag" th:with="type=${@dict.getType('flow_reconciliation_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            
                            
                            <li>
                                <p>资金渠道：</p>
                                <input type="text" name="fundsChannel"/>
                            </li>
                            <li>
                                <p>业务类型：</p>
                                <select name="bizType" th:with="type=${@dict.getType('flow_biz_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            
                           
                            <li>
                                <p>支付流水号：</p>
                                <input type="text" name="drcr"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="reconciliation:liquidationflow:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="reconciliation:liquidationflow:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="reconciliation:liquidationflow:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="reconciliation:liquidationflow:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('reconciliation:liquidationflow:edit')}]];
        var removeFlag = [[${@permission.hasPermi('reconciliation:liquidationflow:remove')}]];
        var prefix = ctx + "reconciliation/liquidationflow";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "清算流水",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'id', 
                    title : '清算流水id',
                    visible: false
                },
                {
                    field : 'bankCode', 
                    title : '银行代码'
                },
                {
                    field : 'bizNo', 
                    title : '机构订单号'
                },
                {
                    field : 'amount', 
                    title : '金额'
                },
                {
                    field : 'bankDate', 
                    title : '清算日期'
                },
                {
                    field : 'compareBatchNo', 
                    title : '对账批次号'
                },
                {
                    field : 'compareDate', 
                    title : '对账日期'
                },
                {
                    field : 'compareFlag', 
                    title : '对账状态。I:初始/S:成功/M:多账/U:金额不等'
                },
                {
                    field : 'voucherNo', 
                    title : '会计凭证号，用于对应挂账凭证，0表示未申请挂账'
                },
                {
                    field : 'gmtCreate', 
                    title : '创建时间'
                },
                {
                    field : 'gmtModified', 
                    title : '最后修改时间'
                },
                {
                    field : 'operator', 
                    title : '操作员'
                },
                {
                    field : 'memo', 
                    title : '备注'
                },
                {
                    field : 'fundsChannel', 
                    title : '资金渠道'
                },
                {
                    field : 'bizType', 
                    title : '业务类型，I:充值，O:提现，B:退款'
                },
                {
                    field : 'outNo', 
                    title : '外部订单号'
                },
                {
                    field : 'fileName', 
                    title : '清算文件名'
                },
                {
                    field : 'hisFlag', 
                    title : '待入历史标记，默认为空，Y:汇总确认待移入历史'
                },
                {
                    field : 'paymentSeqNo', 
                    title : '银行卡类型，dr：借记，cr：贷记'
                },
                {
                    field : 'drcr', 
                    title : '支付流水号'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>